﻿using HiTeachers.Interfaces;

namespace HiTeachers.Data.Manager
{
    public class NHibernateDaoFactory : IDaoFactory
    {
        public static readonly IDaoFactory Instance = new NHibernateDaoFactory();

        //private readonly IWindsorContainer _windsorContainer;
        //public static readonly IDaoFactory Instance = new NHibernateDaoFactory();

        //private NHibernateDaoFactory()
        //{
        //    _windsorContainer = new WindsorContainer(new XmlInterpreter());
        //}

        //public T GetDao<T>(string id) where T : IDao
        //{
        //    Check.Require(string.IsNullOrEmpty(id) == false, "component id cannot be null or empty");
        //    return (T)_windsorContainer.Resolve(typeof(T));
        //}
        public ISubjectDao GetSubjectDao()
        {
            return new SubjectDao();
        }

        public ILoggerEmailDao GetLoggerEmailDao()
        {
            return new LoggerEmailDao();
        }

        public INewDao GetNewDao()
        {
            return new NewDao();
        }

        public IStaticPageDao GetStaticPageDao()
        {
            return new StaticPageDao();
        }

        public IStudentFeedbackDao GetStudentFeedbackDao()
        {
            return new StudentFeedbackDao();
        }

        public IStudentRequestDao GetStudentRequestDao()
        {
            return new StudentRequestDao();
        }

        public ITeacherDao GetTeacherDao()
        {
            return new TeacherDao();
        }

        public IFeeConfigDao GetFeeConfigDao()
        {
            return new FeeConfigDao();
        }

        public IContactedRequestDao GetContactedRequestDao()
        {
            return new ContactedRequestDao();
        }

        public IPaymentInfoDao GetPaymentInfoDao()
        {
            return new PaymentInfoDao();
        }

        public ISiteConfigDao GetSiteConfigDao()
        {
            return new SiteConfigDao();
        }
    }
}
